//
//  ScrollViewTwoTableViewCell.m
//  OneDay
//
//  Created by lanou3g on 15/11/2.
//  Copyright © 2015年 oneDay. All rights reserved.
//

#import "ScrollViewTwoTableViewCell.h"

@implementation ScrollViewTwoTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self addSubViews];
    }
    return self;
}

- (void)addSubViews
{
    self.text1Label = [[UILabel alloc] initWithFrame:CGRectMake(2 * kSpace, 3 * kSpace, kWidth - 4 * kSpace, 80)];
    self.text1Label.backgroundColor = [UIColor yellowColor];
    [self.contentView addSubview:self.text1Label];
    
    self.text2Label = [[UILabel alloc] initWithFrame:CGRectMake(kWidth - 100 - kSpace, self.text1Label.bottom + kSpace, 100, 40)];
    self.text2Label.backgroundColor = [UIColor cyanColor];
    [self.contentView addSubview:self.text2Label];
    
}

- (void)setModel:(ScrollViewNextModel *)model
{
    if (_model != model) {
        _model = model;
    }
    
    self.text1Label.text = model.text1;
    self.text2Label.text = model.text2;
}




- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
